import React, { Component } from 'react'

export default class Chart extends Component {
    // init = () => {
    //     console.log(this)
    // }

    // init(num){
    //     console.log(num)
    // }
    render() {
        return (
            <div>
                {/* <button onClick = { this.init.bind(this) }>按钮</button> */}
                {/* <button onClick = { (ev) => {
                    this.init(123)
                } }>按钮</button> */}

                {/* <button onClick = { this.init.bind(this, 88888888) }>按钮</button> */}

                {/* onClick (合成事件)  body */}

                {/* <div onClick={() => {
                    console.log('最外面')
                }} className="one">
                    <div ref="two" className="two">
                        <div ref="three" onClick={() => {
                            console.log('最里面')
                        }} className="three"></div>
                    </div>
                </div> */}

                {/* <div ref="one" className="one">
                    <div ref="two" className="two">
                        <div ref="three" className="three">

                        </div>
                    </div>
                </div> */}

            </div>
        )
    }
    componentDidMount() {
        // this.refs.one.addEventListener('click', () => {
        //     console.log('最外层')
        // }, true)
        // this.refs.two.addEventListener('click', () => {
        //     console.log('中间的')
        // }, true)
        // this.refs.three.addEventListener('click', () => {
        //     console.log('最里面')
        // }, true)
    }
}
